package algorithm.classification.functionsandloss;

public class ActivationFunction_AtanH implements ActivationFunction
{

	
	public double getDerivatedValue(double x) {
		double f=getValue(x);
		return(1.0-f*f);
	}

	
	public double getValue(double x) 
	{
		if (x>5) return(1.0);
		if (x<-5) return(-1.0);
		double ex=Math.exp(x);
		double exm=Math.exp(-x);
		return((ex-exm)/(ex+exm));
	}

}
